<template>
  <div>
    <div class="commonHead">
      <div class="headLeft" @click="enterCate">
        <van-icon class="iconfont" class-prefix="icon" name="leimupinleifenleileibie" size="26"></van-icon>
        <span>分类</span>
      </div>
      <div class="headMiddle" @click="toSearch">
        <van-icon class="iconfont" class-prefix="icon" name="sousuo" size="20"></van-icon>
        <p>搜索商品/店铺</p>
      </div>
      <div class="headRight">
        <van-icon class-prefix="icon" class="iconfont" name="xinxi" size="26"></van-icon>
        <span>消息</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    enterCate () {
      this.$router.push('/cate')
    },
    toSearch () {
      this.$router.push('/search')
    }
  }
}
</script>

<style lang="scss" scoped>
.commonHead {
  box-sizing: border-box;
  background-color: #323232;
  padding: 0 2PX;
  display: flex;
  color: #fff;
  height: 46px;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99;
  .headLeft {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    span {
      font-size: 14PX;
    }
  }
  .headMiddle {
    display: flex;
    flex: 1;
    height: 36px;
    box-sizing: border-box;
    padding: 0 10px;
    align-items: center;
    background-color: rgba(255,255,255,.2);
    border-radius: 20px;
    p {
      font-size: 12PX;
      margin-left: 5px;
    }
  }
  .headRight {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    span {
      font-size: 14PX;
    }
  }
}
</style>
